<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 包含头部信息用于适应不同设备 -->
<meta name="viewport"
	content="width=device-width, initial-scale=1
    	user-scalable=no">
<!-- 包含 bootstrap 样式表 -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/BootStrap/css/bootstrap.min.css">
<!-- uedite -->
<script type="text/javascript"
	src="${pageContext.request.contextPath}/utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/utf8-jsp/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${pageContext.request.contextPath}/utf8-jsp/lang/zh-cn/zh-cn.js"></script>
<title>教师管理-增加</title>

<script type="text/javascript">
	/*实例化编辑器 */
	var um = UE.getEditor('myEditor');
	function addTeacher() {
		var form = document.forms[1];
		form.action = "${pageContext.request.contextPath }/student?method=addAndUpdate";
		form.method = "post";
		form.submit();
	}
</script>

</head>
<body>
	<div class="container">
		<div class="row clearfix">

			<div class="col-md-12 column" style="margin-bottom: 50px">
				<form class="form-horizontal" role="form"
					action="${pageContext.request.contextPath}/student?method=importStudent"
					enctype="multipart/form-data" method="post">
					自动导入：<input type="file" name="file1"><br /> <input
						class="btn btn-default" type="submit" value="提交" />

				</form>
			</div>
			<div class="col-md-12 column">

				<form class="form-horizontal" role="form" action=""
					name="teacherForm">
					<input type="hidden" name="id" value="${student.studentid }">
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">学号:</label>
						<div class="col-sm-2">
							<input type="text" name="newStudentId"
								value="${student.studentid }" class="form-control"
								id="inputEmail3" />
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">姓名:</label>
						<div class="col-sm-2">
							<input type="text" name="name" value="${student.name }"
								class="form-control" id="inputEmail3" />
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">班级:</label>
						<div class="col-sm-2">
							<select class="combobox" name="classid">
								<c:if test="${!empty classList}">
									<c:forEach items="${classList}" var="s">
										<option value="${s.classid }" name="classid">${s.classname }</option>
									</c:forEach>
								</c:if>
							</select>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="button" class="btn btn-default"
								onclick="addTeacher()">添加</button>
							&nbsp;&nbsp;&nbsp;
							<button type="reset" class="btn btn-default">重置</button>
						</div>
					</div>
				</form>

			</div>
		</div>
	</div>

	<!-- JavaScript 放置在文档最后面可以使页面加载速度更快 -->
	<!-- 可选: 包含 jQuery 库 -->
	<script
		src="${pageContext.request.contextPath }/BootStrap/js/jquery-3.1.1.js"></script>
	<!-- 可选: 合并了 Bootstrap JavaScript 插件 -->
	<script
		src="${pageContext.request.contextPath }/BootStrap/js/bootstrap.min.js"></script>
</body>
</html>